<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!doctype html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>童话世界</title>
<meta name="description" content="一个充满童话世界的地方，带你回味童年." />
<meta name="keywords" content="童话、英雄和魔法" />
<link rel="shortcut icon" href="images/favicon.ico" />
<!-- 引入bootstrap 样式文件 -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- 引入我们自己的样式文件 -->
<link rel="stylesheet" href="css/personal.css">
<!-- 先引入jquery js文件 -->
<script src="js/jquery-3.5.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<!--[if lt IE 9]>
    <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
<script language="javascript">
	function del(name) {
		if (window.confirm("确认要删除此信息吗?")) {
			window.location.href = "${pageContext.request.contextPath}/deleteShouCang?id="
					+ name;
		}
	}

	function del1(id) {
		if (window.confirm("确认要删除此信息吗?")) {
			window.location.href = "${pageContext.request.contextPath}/deleteLiShi?id="
					+ id;
		}
	}
</script>
</head>

<body>
	<!-- 导航栏 -->
	<nav class="navbar navbar-default">
		<div class="container">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
					aria-expanded="false">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a class="navbar-brand"
					href="${pageContext.request.contextPath}/home"><img
					style="margin-left: 15px;" src="images/logo.jpg" alt="童话世界"></a>
			</div>

			<div class="collapse navbar-collapse"
				id="bs-example-navbar-collapse-1">
				<ul class="nav navbar-nav">
					<li><a href="${pageContext.request.contextPath}/home">首页 <span
							class="sr-only">(current)</span></a></li>
					<li><a href="${pageContext.request.contextPath}/animations">动画</a></li>
					<li><a href="${pageContext.request.contextPath}/news">资讯</a></li>
					<li><a href="${pageContext.request.contextPath}/rank">排行榜</a></li>
					<li class="active"><a
						href="${pageContext.request.contextPath}/personal">个人中心</a></li>
				</ul>
				<form action="${pageContext.request.contextPath}/searchAnim"
					method="post" class="navbar-form navbar-left">
					<div class="form-group">
						<input type="text" name="animname" class="form-control"
							placeholder="搜索动画">
					</div>
					<button type="submit" class="btn btn-default">搜索</button>
				</form>
				<ul class="nav navbar-nav navbar-right">
					<li><a href="${pageContext.request.contextPath}/personal">${info.user_name}</a></li>
					<li><a href="${pageContext.request.contextPath}/logout">退出登录</a></li>
				</ul>
			</div>
			<!-- /.navbar-collapse -->
		</div>
		<!-- /.container-fluid -->
	</nav>

	<!-- 主体部分 -->
	<div class="container" style="margin-top: 50px;">
		<div class="container1 pb30">

			<div class="clear-backend">
				<div class="avatar">
					<div>
						<a href="javascript:;" target="_blank"> <img
							src="images/bg.jpg" alt="">
						</a>
					</div>
				</div>

				<!-- tab-menu -->
				<input type="radio" class="tab-1" name="tab" checked="checked">
				<span>个人中心</span> <input type="radio" class="tab-2" name="tab">
				<span>我的收藏</span> <input type="radio" class="tab-3" name="tab">
				<span>浏览历史</span>


				<!-- tab-top-bar -->
				<div class="top-bar"></div>

				<!-- tab-content -->
				<div class="tab-content">
					<section class="tab-item-1">
						<div class="row">
							<div>
								<table width="820" border="1" cellpadding="0" cellspacing="0"
									style="text-align: center; line-height: 30px;" class="table table-bordered">
									<tr align="middle">
										<td align="middle">id:${info.user_id}</td>
									</tr>
									<tr align="middle">
										<td align="middle">昵称:${info.user_nickname}</td>
									</tr>
									<tr align="middle">
										<td align="middle">性别:${info.user_gender}</td>
									</tr>
									<tr align="middle">
										<td align="middle">地区:${info.user_diqu == null ? "无" :info.user_diqu }
										</td>
									</tr>
									<tr align="middle">
										<td align="middle">简介:${info.user_jianjie == null ? "无" :info.user_jianjie}
										</td>
									</tr>
									<tr>
										<td align="middle"><a
											href="${pageContext.request.contextPath}/updatepersonalpage?id=${info.user_id}" class="btn btn-default">编辑</a>
										</td>
									</tr>
								</table>
							</div>
						</div>
					</section>
					<section class="tab-item-2">
						<div class="row">
							<div>
								<table width="820" border="1" cellpadding="0" cellspacing="0"
									style="text-align: center; line-height: 30px;" class="table table-bordered">
									<c:forEach var="item" items="${shouchang}">
										<tr align="middle">
											<td align="middle">${item.shoucang_anim_name}</td>
											<td align="middle"><input type="submit" name="bt1" class="btn btn-default"
												value="删除" onClick="del('${item.shouchang_id}')"></td>
										</tr>
									</c:forEach>
								</table>
							</div>
						</div>
					</section>
					<section class="tab-item-3">
						<div class="row">
							<div>
								<table width="820" border="1" cellpadding="0" cellspacing="0"
									style="text-align: center; line-height: 30px;" class="table table-bordered">
									<c:forEach var="item" items="${lishi}">
										<tr align="middle">
											<td align="middle">${item.lishi_anim_name}</td>
											<td align="middle"><input type="submit" name="bt1"  class="btn btn-default"
												value="删除" onClick="del1('${item.lishi_id}')"></td>
										</tr>
									</c:forEach>
								</table>
							</div>
						</div>
					</section>
				</div>
			</div>
		</div>
	</div>

	<!-- 页面尾部 -->
	<div class="footer container">
		<hr>
		<p class="text-center">2020-forever</p>
	</div>
</body>

</html>